package com.link2room.rodimus.thirdController.brandwisdom;

import cn.brandwisdom.gss.param.GssResponseParamDto;
import com.link2room.common.dto.result.base.BaseResultDto;
import com.link2room.rodimus.facade.ICommentFacadeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by VegetaKo on 2017/2/24.
 */
@RestController
@RequestMapping("/third/Brandwisdom")
public class BrandwisdomController {
    @Resource
    private ICommentFacadeService commentFacadeService;

    @RequestMapping(value="/GssCallback",method = RequestMethod.POST)
    public BaseResultDto listGoodCategorys(
            @RequestParam(value = "signature" ,required = false) String signature,
            @RequestParam (value = "callid" ,required = false) String callid,
            @RequestParam (value = "timestamp" ,required = false) String timestamp,
            @RequestParam (value = "membernum" ,required = false) String membernum,
            @RequestParam (value = "issueid" ,required = false) String issueid
    ) throws Exception {
        BaseResultDto resDto = new BaseResultDto();

        GssResponseParamDto gssResponseParamDto = new GssResponseParamDto();
        gssResponseParamDto.setCallid(callid );
        gssResponseParamDto.setTimestamp( timestamp);
        gssResponseParamDto.setMembernum( membernum);
        gssResponseParamDto.setIssueid(issueid );
        commentFacadeService.awarBarndwisdom(gssResponseParamDto);
        //result.setQueryResult(mallApiFacadeService.getGoodCategorysList());
        resDto.setResultCode(0);
        return resDto;
    }
}
